﻿using System.Windows;
using System.Windows.Controls;

namespace Demos
{
    public partial class Demo0001 : UserControl
    {
        public Demo0001()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(SilverlightControl6_Loaded);
        }

        void SilverlightControl6_Loaded(object sender, RoutedEventArgs e)
        {
            this.DataContext = Q.DataManager.GetUserData();

            code.Text =
           @"<StackPanel >
                <TextBlock Text=""{Binding ID}"" />
                <TextBlock Text=""{Binding Caption}"" />
                <TextBlock Text=""{Binding TeamCaption}"" />
                <ListBox ItemsSource=""{Binding GroupName}""/>
            </StackPanel>";

        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            dynamic userinfo = Q.DataManager.GetUserData();
            //Q.LoggerManager.Debug(userinfo.UserID);
            //MessageBox.Show(userinfo.UserID);

        }
    }
}
